//
//  UAError.m
//  Unidbaccess
//
//  Created by Toplica Tanasković on 12/13/08.
//  Copyright 2008 HOME. All rights reserved.
//

#import "UAError.h"

@implementation UAError

@synthesize errorInfo;

- (id) initWithErrorInfo: (NSDictionary *) anErrorInfo {
	self = [super init];
	if (self) {
		self.errorInfo = anErrorInfo;
	}
	return self;
}

- (void) dealloc {
	[errorInfo release];
	
	[super dealloc];
}

- (NSNumber *) errorCode {
	return [errorInfo valueForKey: @"errorCode"];
}

- (NSString *) errorMessage {
	return [errorInfo valueForKey: @"errorMessage"];
}

- (id)copyWithZone:(NSZone *)zone
{
    UAError * copy = [[[self class] allocWithZone: zone]
					  initWithErrorInfo: self.errorInfo];
    return copy;
}@end
